import React, {Component} from 'react';
import { Layout } from 'antd';
import {
  MenuUnfoldOutlined,
  MenuFoldOutlined
} from '@ant-design/icons';
import style from './styles.module.less';
import './index.less';

const {Header} = Layout;

class SiderHeader extends Component{
  render(){
    const {collapsed, toggle} = this.props;
    return(
      <Header className={ style.header }>
        {React.createElement(collapsed ? MenuFoldOutlined : MenuUnfoldOutlined, {
          className: 'trigger',
          onClick: toggle
        })}
      </Header>
    )
  }
} 

export default SiderHeader